<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Cadastro de Fabricante</title>
    </h:head>
    
    
    <h:body>
     
        <p:panel header="Cadastro de Fabricante">
        <h:form id="cadastrofabricante">
    <h:messages />
    
    <h:inputHidden value="#{fabricanteBean.fabricante.id}" />
    <h:inputHidden value="#{fabricanteBean.destinoSalvar}" />
    <h:panelGrid columns="2">  
    <h:outputLabel value="Nome*:" for="nome" />
    <h:inputText  id="nome" label="nome" value="#{fabricanteBean.fabricante.nome}" size="30"
                  maxlength="30" required="true" requiredMessage="Nome Obrigatório">
        <f:validateLength minimum="3" maximum="30"/>
    </h:inputText>
    
     <h:outputLabel value="Nacionalidade*:" for="nacionalidade" />
     <h:inputText  id="nacionalidade" label="nacionalidade" value="#{fabricanteBean.fabricante.nacionalidade}" size="30"
                  maxlength="30" required="true" requiredMessage="Nacionalidade Obrigatoria">
        <f:validateLength minimum="3" maximum="30"/>
        
    </h:inputText>
     
    </h:panelGrid>
    
    <h:commandButton action="#{fabricanteBean.salvar}" value="Salvar" />
        </h:form>
        </p:panel>
    </h:body>
</html>